<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="author" content="林镭特">
    <title></title>
    <style>
        main{
            display: flex;
            height: 34px;
            width: 738px;
            margin: 0 auto;
            
        }
        main p{
            position: relative;
            bottom: 10px;
        }
       main .box{
            text-align: center;
            border: 1px solid gainsboro;
            padding: 5px;
            margin-left: 5px;
           font-size: 12px;
           position: relative;
        }
        .box:hover{
            border: 1px solid red;
        }

        .box-item{
            position: absolute;
            width: 272px;
            height: 37px;
            text-align: left;
            line-height: 37px;
            background-color: beige;
            border: 1px solid lightgray;
            top: 33px;
            left: 0;
            display: none;
        }
        .box:hover .box-item{
            display: block;
        }
        .content{
            background-color: greenyellow;
            color: #fff;
            font-weight: 800;
            font-size: 18px;
            width: 106px;
            height: 46px;
            margin: 0 auto;
            margin-top: 20px;
            text-align: center;
            line-height: 46px;
            display: none;
        }
      main  div.active{
            border: 1px solid red;
        }
    </style>
</head>
<body>
    <main>
        <p>白条分期</p>
        <div class="box">
            不分期
            <div class="box-item">
                无服务费
            </div>
        </div>
        <div class="box">
            ￥2029.66起x3期
            <div class="box-item">
                含服务费：费率0.5%起，￥30起×3期
            </div>
        </div>
        <div class="box">
            ￥2029.66起x6期
            <div class="box-item">
                含服务费：费率0.5%起，￥30起×6期
            </div>
        </div>
        <div class="box">
            ￥2029.66起x12期
            <div class="box-item">
                无服务费
            </div>
        </div>
        <div class="box">
            ￥2029.66起x24期
            <div class="box-item">
                含服务费：费率0.5%起，￥30起×24期
            </div>
        </div>
    </main>
    <div class="content">打白条</div>
    <script src="jQuery.js"></script>
<script>
    $('.box').click(function () {
        if ($(this).hasClass('active')) {
            $('.box').removeClass('active');
            $('.content').hide()
            
        } else {
            $('.box').removeClass('active');
            $('.content').show()
            $(this).addClass('active');
        }
    })


</script>
</body>
</html>